<?php
include_once('phpbb2_settings.php');

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

include('phpbb2.functions.php');

$username = $_GET['username'];
$new_password = md5($_GET['password']);
$email = $_GET['email'];
$return = $_GET['return'];

create_phpbb_user($username, $new_password, $email);

$counter = 0;
phpbb_login($username, $password, $email, $return, $counter, PAGE_INDEX);

header('Location: ' . $return);
				
?>
